package org.vshe.improve.spring.prospring3.ch7.pfb;

import org.springframework.context.support.GenericXmlApplicationContext;

public class ProxyFactoryBeanExample {
	public static void main(String args[]) {
		GenericXmlApplicationContext context = new GenericXmlApplicationContext();
		context.load("classpath:ch7/pfb/pfb.xml");
		context.refresh();
		
		MyBean bean1 = (MyBean) context.getBean("myBean1");
		MyBean bean2 = (MyBean) context.getBean("myBean2");
		
		System.out.println("Execute Bean 1");
		bean1.execute();
		
		System.out.println("Execute Bean 2");
		bean2.execute();
	}
}
